#include "coordinate.h"
#include <QVector>
#include <QPainter>
#include <QPen>

Coordinate::Coordinate(QGraphicsItem *parent)
    :QGraphicsItem(parent)
{

}

QRectF Coordinate::boundingRect() const
{
    return QRectF(0, 0, 1000, 200);
}

void Coordinate::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
    Q_UNUSED(widget);

    QPen pen(Qt::red, 1, Qt::DashDotLine, Qt::FlatCap);
    QVector<qreal> dashes;
    qreal space = 4;
    dashes << 1 << space << 3 << space << 9 << space
               << 27 << space << 9 << space;
    pen.setDashPattern(dashes);

    painter->setPen(pen);

    painter->drawLine(0,0,1000,0);
    painter->drawLine(0,0,1000,20);


}
